// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IAuthenticationService.cs" company="AzureContrib (Open source library http://azurecontrib.codeplex.com)">
//   Microsoft Public License (Ms-PL)
// </copyright>
// <summary>
//   Service to authenticate calls to resources
// </summary>
// --------------------------------------------------------------------------------------------------------------------

using Microsoft.IdentityModel.Claims;

namespace AzureContrib.WindowsAzure.AccessControlService
{
	/// <summary>
	/// Service to authenticate calls to resources
	/// </summary>
	public interface IAuthenticationService
	{
		/// <summary>
		/// Will authenticate users coming in to the service
		/// </summary>
		/// <param name="resourceName">The name of the resource to authenticate access to.</param>
		/// <param name="incomingPrincipal">The principal of the user to be authenticated.</param>
		/// <returns>The principal (possibly) modified by authentication.</returns>
		IClaimsPrincipal Authenticate(string resourceName, IClaimsPrincipal incomingPrincipal);
	}
}